﻿using System;
using System.Collections.Generic;
using System.Data;

using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class control_tour_LeftTourDuLich : System.Web.UI.UserControl
{
    protected void Page_Load(object sender, EventArgs e)
    {
        if (IsPostBack)
        {
            
        }
    }
    protected string GetListDiaDiemTrongNuoc()
    {
        string htmlCode = "";
        string check = "?menu=175&parent=173";
        DataTable dt = DataAccess.ExeSQLToDataTable("select * from DiaDanh where CheckTour = '"+check+"'");
        foreach (DataRow row in dt.Rows)
        {
            htmlCode += @"<li>
                        <img src='style/css/img/icon_arrow2.gif' /><a href='tourdulich.aspx" + row["CheckTour"] + @"&id=" + row["IdYahoo"] + @"'>" + row["Name"] + @"</a>
                    </li>";
        }
        return htmlCode;
    }
    protected string GetListLoaiHinhDuLich()
    {
        string htmlCode = "";
        DataTable dt = DataAccess.ExeSQLToDataTable("select * from LoaiHinhDuLich");
        foreach (DataRow row in dt.Rows)
        {
            htmlCode += @"<li>
                        <img src='style/css/img/icon_arrow4.png' /><a href='tourdulich.aspx?id=-1&idloaihinh="+row[0]+@"'>" + row["Name"] + @"</a>
                    </li>";
        }
        return htmlCode;
    }
    protected string LoadInfoAnhQcHoTro()
    {
        DataTable tbl = DataAccess.ExeSQLToDataTable("select top(1) * from banner where ViTri=7");
        if (!string.IsNullOrEmpty(tbl.Rows[0]["Image"].ToString()))
        {
            return @"<img src='files_upload/images/quangcao/" + tbl.Rows[0]["Image"] + @"' />";
        }
        return "";
    }
}